﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CacheProxy
{
    public class CacheManager
    {
        ICacheProxyProvider cacheProxy;
        public T GetCache<T>(string key) where T: class
        {
            return this.cacheProxy.GetItem<T>(key, new Func<string, T>(FallbackImp<T>));
        }

        private T FallbackImp<T>(string key) where T : class
        {
            return default(T);
        }
    }
}
